import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/list_app_notice_entity.dart';

ListAppNoticeEntity $ListAppNoticeEntityFromJson(Map<String, dynamic> json) {
	final ListAppNoticeEntity listAppNoticeEntity = ListAppNoticeEntity();
	final int? pageNum = jsonConvert.convert<int>(json['pageNum']);
	if (pageNum != null) {
		listAppNoticeEntity.pageNum = pageNum;
	}
	final int? pageSize = jsonConvert.convert<int>(json['pageSize']);
	if (pageSize != null) {
		listAppNoticeEntity.pageSize = pageSize;
	}
	final int? totalSize = jsonConvert.convert<int>(json['totalSize']);
	if (totalSize != null) {
		listAppNoticeEntity.totalSize = totalSize;
	}
	final int? totalPages = jsonConvert.convert<int>(json['totalPages']);
	if (totalPages != null) {
		listAppNoticeEntity.totalPages = totalPages;
	}
	final List<ListAppNoticeContent>? content = jsonConvert.convertListNotNull<ListAppNoticeContent>(json['content']);
	if (content != null) {
		listAppNoticeEntity.content = content;
	}
	return listAppNoticeEntity;
}

Map<String, dynamic> $ListAppNoticeEntityToJson(ListAppNoticeEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['pageNum'] = entity.pageNum;
	data['pageSize'] = entity.pageSize;
	data['totalSize'] = entity.totalSize;
	data['totalPages'] = entity.totalPages;
	data['content'] =  entity.content?.map((v) => v.toJson()).toList();
	return data;
}

ListAppNoticeContent $ListAppNoticeContentFromJson(Map<String, dynamic> json) {
	final ListAppNoticeContent listAppNoticeContent = ListAppNoticeContent();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		listAppNoticeContent.id = id;
	}
	final String? labelName = jsonConvert.convert<String>(json['labelName']);
	if (labelName != null) {
		listAppNoticeContent.labelName = labelName;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		listAppNoticeContent.type = type;
	}
	final String? noticeName = jsonConvert.convert<String>(json['noticeName']);
	if (noticeName != null) {
		listAppNoticeContent.noticeName = noticeName;
	}
	final String? url = jsonConvert.convert<String>(json['url']);
	if (url != null) {
		listAppNoticeContent.url = url;
	}
	final String? isRead = jsonConvert.convert<String>(json['isRead']);
	if (isRead != null) {
		listAppNoticeContent.isRead = isRead;
	}
	final String? busId = jsonConvert.convert<String>(json['busId']);
	if (busId != null) {
		listAppNoticeContent.busId = busId;
	}
	final String? collectId = jsonConvert.convert<String>(json['collectId']);
	if (collectId != null) {
		listAppNoticeContent.collectId = collectId;
	}
	final String? taskId = jsonConvert.convert<String>(json['taskId']);
	if (taskId != null) {
		listAppNoticeContent.taskId = taskId;
	}
	final String? groupId = jsonConvert.convert<String>(json['groupId']);
	if (groupId != null) {
		listAppNoticeContent.groupId = groupId;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		listAppNoticeContent.createTime = createTime;
	}
	final String? taskStatus = jsonConvert.convert<String>(json['taskStatus']);
	if (taskStatus != null) {
		listAppNoticeContent.taskStatus = taskStatus;
	}
	return listAppNoticeContent;
}

Map<String, dynamic> $ListAppNoticeContentToJson(ListAppNoticeContent entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['labelName'] = entity.labelName;
	data['type'] = entity.type;
	data['noticeName'] = entity.noticeName;
	data['url'] = entity.url;
	data['isRead'] = entity.isRead;
	data['busId'] = entity.busId;
	data['collectId'] = entity.collectId;
	data['taskId'] = entity.taskId;
	data['groupId'] = entity.groupId;
	data['createTime'] = entity.createTime;
	data['taskStatus'] = entity.taskStatus;
	return data;
}